/**
 * 
 */
package com.yuedao.sender.service;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;

import com.yuedao.sender.model.BaseInfoVehicle;


/**
 * @author Administrator
 *
 */
@Service
public interface BaseInfoVehicleRepository extends JpaRepository<BaseInfoVehicle, Long> {
    //拿取未发送的数据(sendflag=0)
	List<BaseInfoVehicle> findBySendFlag (int flag);
	
	List<BaseInfoVehicle> findByEngineId (String EngineId);
	
	 @Query(value = "select count(b.id) from base_info_vehicle b where b.vehicle_no = ?1", nativeQuery = true)
	 Integer isExitVehice(String vehicleNo);
}
